﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace agvcontroller.GUI
{
    /// <summary>
    /// Interaction logic for UCSystemInfomaion.xaml
    /// </summary>
    public partial class UCSystemInfomaion : UserControl
    {
        UCVehicleViewerStack VehicleViewerStack = new UCVehicleViewerStack();
        UCAGVCInfo AGVCInfo = new UCAGVCInfo();
        UCNodeViewer NodeInfo = new UCNodeViewer();

        public UCSystemInfomaion()
        {
            InitializeComponent();

            bdSystemSifo.Child = AGVCInfo;
        }

        private static UCSystemInfomaion uniqueInstance;

        public static UCSystemInfomaion getInstance()
        {
            if (uniqueInstance == null)
            {
                uniqueInstance = new UCSystemInfomaion();
            }
            return uniqueInstance;
        }

        public void SetUIElement(enumSystemMode mode)
        {
            switch (mode)
            {
                case enumSystemMode.AGVC:
                    bdSystemSifo.Child = AGVCInfo;

                    break;
                case enumSystemMode.Cross:
                    break;
                case enumSystemMode.LockZone:
                    break;
                case enumSystemMode.Node:
                    bdSystemSifo.Child = NodeInfo;
                    break;
                case enumSystemMode.Vehicle:
                    bdSystemSifo.Child = VehicleViewerStack;
                    break;

            }
        }
    }
}
